//
//  MJ_TaskTableViewCell.m
//  UEAssistant
//
//  Created by mac on 2018/1/2.
//  Copyright © 2018年 youyixinxi. All rights reserved.
//

#import "MJ_TaskTableViewCell.h"

@interface MJ_TaskTableViewCell ()

@property (nonatomic, strong)LWAsyncDisplayView *asyncDisplayView;

@end

@implementation MJ_TaskTableViewCell

- (LWAsyncDisplayView *)asyncDisplayView {
    if (!_asyncDisplayView) {
        _asyncDisplayView = [[LWAsyncDisplayView alloc] initWithFrame:CGRectZero];
        _asyncDisplayView.displaysAsynchronously = NO;
    }
    return _asyncDisplayView;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        self.separatorInset = UIEdgeInsetsZero;
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self.contentView addSubview:self.asyncDisplayView];
    }
    return self;
}


- (void)layoutSubviews {
    [super layoutSubviews];
    self.asyncDisplayView.frame = CGRectMake(0,0,SCREEN_WIDTH,self.cellLayout.cellHeight);
    
    
}

- (void)setCellLayout:(MJ_TaskCellLayout *)cellLayout {
    if (_cellLayout != cellLayout) {
        _cellLayout = cellLayout;
        self.asyncDisplayView.layout = self.cellLayout;
        
    }
}



@end
